import 'package:flutter/material.dart';
import 'package:iidx_progress_tool/data/model/music_progress.dart';

import '../../data/model/music_data.dart';
import 'difficulty_list.dart';

class MusicDataDetail extends StatefulWidget {
  final MusicData musicData;

  const MusicDataDetail({super.key, required this.musicData});

  @override
  State<StatefulWidget> createState() {
    return _MusicDataDetailState();
  }

}

class _MusicDataDetailState extends State<MusicDataDetail> {
  MusicProgress? progress;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text("详情"),
      ),
      body: ListView(
        children: [
          Text(
            widget.musicData.title,
            style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
          ),
          _infoRow("artist: ${widget.musicData.artist}"),
          _infoRow("genre: ${widget.musicData.genre}"),
          DifficultyExpansionPanelList(musicData: widget.musicData)
        ],
      ),
    );
  }

  Widget _infoRow(String content) {
    return Text(
      content,
      style: const TextStyle(fontSize: 20),
    );
  }

}